package com.fishery.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fishery.order.entity.Customer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fishery.order.entity.vo.CustomerRankVo;
import com.fishery.order.entity.vo.CustomerVo;

import java.util.List;

/**
 * <p>
 * 顾客服务类
 * </p>
 *
 * @author run 、 ghost
 * @since 2021-01-31
 */
public interface CustomerService extends IService<Customer> {

	/**
	 * 添加顾客
	 *
	 * @param customer
	 * @return
	 */
	public boolean createCustomer(Customer customer);

	/**
	 * 修改顾客信息
	 *
	 * @param customerVo
	 * @return
	 */
	boolean updateCustomerInfo(CustomerVo customerVo);

	/**
	 * 通过顾客id删除顾客
	 *
	 * @param customerId
	 * @return
	 */
	public boolean deleteCustomer(String customerId);

	/**
	 * 通过基地ID查询基地的顾客
	 *
	 * @param baseId
	 * @return
	 */
	public List<CustomerVo> searchCustomerOfBase(String baseId);

	/**
	 * 通过基地ID分页查询基地的顾客
	 *
	 * @param baseId
	 * @param page
	 * @param size
	 * @return
	 */
	public IPage<CustomerVo> searchCustomerOfBase(String baseId, Integer page, Integer size);


	/**
	 * 通过基地ID查询排名前SIZE的顾客
	 *
	 * @param baseId
	 * @param size
	 * @return
	 */
	List<CustomerRankVo> getTopCustomerOfBase(String baseId, Integer size);
}
